<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Aria: ArFileParser Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Aria
   &#160;<span id="projectnumber">2.9.4</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classArFileParser.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classArFileParser-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ArFileParser Class Reference<div class="ingroups"><a class="el" href="group__OptionalClasses.html">Optional Classes</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Class for parsing files more easily.  
 <a href="classArFileParser.html#details">More...</a></p>

<p><code>#include &lt;ArFileParser.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ae9685e3b4f3ed5bbd0f7107ab9d81122"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae9685e3b4f3ed5bbd0f7107ab9d81122"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArFileParser.html#ae9685e3b4f3ed5bbd0f7107ab9d81122">addHandler</a> (const char *keyword, <a class="el" href="classArRetFunctor1.html">ArRetFunctor1</a>&lt; bool, <a class="el" href="classArArgumentBuilder.html">ArArgumentBuilder</a> * &gt; *functor)</td></tr>
<tr class="memdesc:ae9685e3b4f3ed5bbd0f7107ab9d81122"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds a functor to handle a keyword that wants an easily parsable string. <br /></td></tr>
<tr class="separator:ae9685e3b4f3ed5bbd0f7107ab9d81122"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac9ea873d4673c1e2c00c42434ed2276b"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArFileParser.html#ac9ea873d4673c1e2c00c42434ed2276b">addHandlerWithError</a> (const char *keyword, <a class="el" href="classArRetFunctor3.html">ArRetFunctor3</a>&lt; bool, <a class="el" href="classArArgumentBuilder.html">ArArgumentBuilder</a> *, char *, size_t &gt; *functor)</td></tr>
<tr class="memdesc:ac9ea873d4673c1e2c00c42434ed2276b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds a functor to handle a keyword that wants an easily parsable string and returns error messages.  <a href="#ac9ea873d4673c1e2c00c42434ed2276b">More...</a><br /></td></tr>
<tr class="separator:ac9ea873d4673c1e2c00c42434ed2276b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5a2431669a64d9beafdf4b1d9a8c437"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArFileParser.html#ab5a2431669a64d9beafdf4b1d9a8c437">ArFileParser</a> (const char *baseDirectory=&quot;./&quot;, bool isPreCompressQuotes=false)</td></tr>
<tr class="memdesc:ab5a2431669a64d9beafdf4b1d9a8c437"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="#ab5a2431669a64d9beafdf4b1d9a8c437">More...</a><br /></td></tr>
<tr class="separator:ab5a2431669a64d9beafdf4b1d9a8c437"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7533fbd8241c6bfe78644791c4d93246"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7533fbd8241c6bfe78644791c4d93246"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArFileParser.html#a7533fbd8241c6bfe78644791c4d93246">cancelParsing</a> ()</td></tr>
<tr class="memdesc:a7533fbd8241c6bfe78644791c4d93246"><td class="mdescLeft">&#160;</td><td class="mdescRight">If parseFile is currently in progress, then terminates it as soon as possible. <br /></td></tr>
<tr class="separator:a7533fbd8241c6bfe78644791c4d93246"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a2af2524acb8e7e02c87dc2944e40c2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArFileParser.html#a0a2af2524acb8e7e02c87dc2944e40c2">clearCommentDelimiters</a> ()</td></tr>
<tr class="memdesc:a0a2af2524acb8e7e02c87dc2944e40c2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears the strings used to mark comments in the file to be parsed.  <a href="#a0a2af2524acb8e7e02c87dc2944e40c2">More...</a><br /></td></tr>
<tr class="separator:a0a2af2524acb8e7e02c87dc2944e40c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f208f62d4f033e5a303c2dc11680301"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0f208f62d4f033e5a303c2dc11680301"></a>
const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArFileParser.html#a0f208f62d4f033e5a303c2dc11680301">getBaseDirectory</a> (void) const </td></tr>
<tr class="memdesc:a0f208f62d4f033e5a303c2dc11680301"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the base directory. <br /></td></tr>
<tr class="separator:a0f208f62d4f033e5a303c2dc11680301"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a54539be017dc61f50eac8ae5983ead91"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArFileParser.html#a54539be017dc61f50eac8ae5983ead91">parseFile</a> (const char *fileName, bool continueOnErrors=true, bool noFileNotFoundMessage=false, char *errorBuffer=NULL, size_t errorBufferLen=0)</td></tr>
<tr class="memdesc:a54539be017dc61f50eac8ae5983ead91"><td class="mdescLeft">&#160;</td><td class="mdescRight">Opens, parses, and then closes the specified file.  <a href="#a54539be017dc61f50eac8ae5983ead91">More...</a><br /></td></tr>
<tr class="separator:a54539be017dc61f50eac8ae5983ead91"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a01ea53048ed82fc16ada1c6107809794"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArFileParser.html#a01ea53048ed82fc16ada1c6107809794">parseFile</a> (FILE *file, char *buffer, int bufferLength, bool continueOnErrors=true, char *errorBuffer=NULL, size_t errorBufferLen=0)</td></tr>
<tr class="memdesc:a01ea53048ed82fc16ada1c6107809794"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parses an open file; the file is not closed by this method.  <a href="#a01ea53048ed82fc16ada1c6107809794">More...</a><br /></td></tr>
<tr class="separator:a01ea53048ed82fc16ada1c6107809794"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1a1e7db097550a8a935738cdb13f3dde"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1a1e7db097550a8a935738cdb13f3dde"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArFileParser.html#a1a1e7db097550a8a935738cdb13f3dde">parseLine</a> (char *line, char *errorBuffer=NULL, size_t errorBufferLen=0)</td></tr>
<tr class="memdesc:a1a1e7db097550a8a935738cdb13f3dde"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function to parse a single line. <br /></td></tr>
<tr class="separator:a1a1e7db097550a8a935738cdb13f3dde"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a809de3588ef4abe66b31352d526824aa"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a809de3588ef4abe66b31352d526824aa"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArFileParser.html#a809de3588ef4abe66b31352d526824aa">remHandler</a> (const char *keyword, bool logIfCannotFind=true)</td></tr>
<tr class="memdesc:a809de3588ef4abe66b31352d526824aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes a handler for a keyword. <br /></td></tr>
<tr class="separator:a809de3588ef4abe66b31352d526824aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac70da823dbd5729ec67793a055b71a62"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac70da823dbd5729ec67793a055b71a62"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArFileParser.html#ac70da823dbd5729ec67793a055b71a62">remHandler</a> (<a class="el" href="classArRetFunctor1.html">ArRetFunctor1</a>&lt; bool, <a class="el" href="classArArgumentBuilder.html">ArArgumentBuilder</a> * &gt; *functor)</td></tr>
<tr class="memdesc:ac70da823dbd5729ec67793a055b71a62"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes any handlers with this functor. <br /></td></tr>
<tr class="separator:ac70da823dbd5729ec67793a055b71a62"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa013644f03dc6f5da8614df0bea055f1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa013644f03dc6f5da8614df0bea055f1"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArFileParser.html#aa013644f03dc6f5da8614df0bea055f1">remHandler</a> (<a class="el" href="classArRetFunctor3.html">ArRetFunctor3</a>&lt; bool, <a class="el" href="classArArgumentBuilder.html">ArArgumentBuilder</a> *, char *, size_t &gt; *functor)</td></tr>
<tr class="memdesc:aa013644f03dc6f5da8614df0bea055f1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes any handlers with this functor. <br /></td></tr>
<tr class="separator:aa013644f03dc6f5da8614df0bea055f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a59f7aab40d8d4ac41b07d44e07a4d689"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a59f7aab40d8d4ac41b07d44e07a4d689"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArFileParser.html#a59f7aab40d8d4ac41b07d44e07a4d689">resetCounters</a> (void)</td></tr>
<tr class="memdesc:a59f7aab40d8d4ac41b07d44e07a4d689"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function to reset counters. <br /></td></tr>
<tr class="separator:a59f7aab40d8d4ac41b07d44e07a4d689"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5fd276fae4c5c56dda18a4c8446d4368"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5fd276fae4c5c56dda18a4c8446d4368"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArFileParser.html#a5fd276fae4c5c56dda18a4c8446d4368">setBaseDirectory</a> (const char *baseDirectory)</td></tr>
<tr class="memdesc:a5fd276fae4c5c56dda18a4c8446d4368"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the base directory. <br /></td></tr>
<tr class="separator:a5fd276fae4c5c56dda18a4c8446d4368"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a17264d80465f66ef31d2f6e6ac1ce266"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArFileParser.html#a17264d80465f66ef31d2f6e6ac1ce266">setCommentDelimiters</a> (const std::list&lt; std::string &gt; &amp;delimiters)</td></tr>
<tr class="memdesc:a17264d80465f66ef31d2f6e6ac1ce266"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the strings used to mark comments in the file to be parsed.  <a href="#a17264d80465f66ef31d2f6e6ac1ce266">More...</a><br /></td></tr>
<tr class="separator:a17264d80465f66ef31d2f6e6ac1ce266"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af71cfefc3cd26797888178a1938d9a93"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af71cfefc3cd26797888178a1938d9a93"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArFileParser.html#af71cfefc3cd26797888178a1938d9a93">setMaxNumArguments</a> (size_t maxNumArguments=512)</td></tr>
<tr class="memdesc:af71cfefc3cd26797888178a1938d9a93"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the maximum number of arguments in a line we can expect. <br /></td></tr>
<tr class="separator:af71cfefc3cd26797888178a1938d9a93"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a804ca9f50a61d95feb59d3b9c5269c7f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a804ca9f50a61d95feb59d3b9c5269c7f"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setPreParseFunctor</b> (<a class="el" href="classArFunctor1.html">ArFunctor1</a>&lt; const char * &gt; *functor)</td></tr>
<tr class="separator:a804ca9f50a61d95feb59d3b9c5269c7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6118e1eaafc1f933c5a7eab96326598f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6118e1eaafc1f933c5a7eab96326598f"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArFileParser.html#a6118e1eaafc1f933c5a7eab96326598f">setQuiet</a> (bool isQuiet)</td></tr>
<tr class="memdesc:a6118e1eaafc1f933c5a7eab96326598f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Turn on this flag to reduce the number of verbose log messages. <br /></td></tr>
<tr class="separator:a6118e1eaafc1f933c5a7eab96326598f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc562cffbc6f3a02e0c1f25fc454f9ba"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afc562cffbc6f3a02e0c1f25fc454f9ba"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArFileParser.html#afc562cffbc6f3a02e0c1f25fc454f9ba">~ArFileParser</a> (void)</td></tr>
<tr class="memdesc:afc562cffbc6f3a02e0c1f25fc454f9ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:afc562cffbc6f3a02e0c1f25fc454f9ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a040977056dcc2147afdaabc704a31eb8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a040977056dcc2147afdaabc704a31eb8"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArFileParser.html#a040977056dcc2147afdaabc704a31eb8">isInterrupted</a> ()</td></tr>
<tr class="memdesc:a040977056dcc2147afdaabc704a31eb8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if <a class="el" href="classArFileParser.html#a7533fbd8241c6bfe78644791c4d93246" title="If parseFile is currently in progress, then terminates it as soon as possible. ">cancelParsing()</a> has been called during <a class="el" href="classArFileParser.html#a54539be017dc61f50eac8ae5983ead91" title="Opens, parses, and then closes the specified file. ">parseFile()</a> <br /></td></tr>
<tr class="separator:a040977056dcc2147afdaabc704a31eb8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a3b8d08bf2b95f0f9cc7b9b7c90e070a9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3b8d08bf2b95f0f9cc7b9b7c90e070a9"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>myBaseDir</b></td></tr>
<tr class="separator:a3b8d08bf2b95f0f9cc7b9b7c90e070a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a59f8a34a40ede94cc0e9884d9d99b90d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a59f8a34a40ede94cc0e9884d9d99b90d"></a>
std::list&lt; std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>myCommentDelimiterList</b></td></tr>
<tr class="separator:a59f8a34a40ede94cc0e9884d9d99b90d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a847547037c918c96ac477e576e3e954a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a847547037c918c96ac477e576e3e954a"></a>
<a class="el" href="classArMutex.html">ArMutex</a>&#160;</td><td class="memItemRight" valign="bottom"><b>myInterruptMutex</b></td></tr>
<tr class="separator:a847547037c918c96ac477e576e3e954a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a246408d2b14b30b0ced76be852e4d630"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a246408d2b14b30b0ced76be852e4d630"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myIsInterrupted</b></td></tr>
<tr class="separator:a246408d2b14b30b0ced76be852e4d630"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9268d5feb0839b04566f5611bd7e6c4f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9268d5feb0839b04566f5611bd7e6c4f"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myIsPreCompressQuotes</b></td></tr>
<tr class="separator:a9268d5feb0839b04566f5611bd7e6c4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8839e37fd4d99e71fc0faf65929717a8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8839e37fd4d99e71fc0faf65929717a8"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myIsQuiet</b></td></tr>
<tr class="separator:a8839e37fd4d99e71fc0faf65929717a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a96d65a6d967325e60840e0d6d08c0c59"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a96d65a6d967325e60840e0d6d08c0c59"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>myLineNumber</b></td></tr>
<tr class="separator:a96d65a6d967325e60840e0d6d08c0c59"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7341309402a973a9e62fcc6bf949bce5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7341309402a973a9e62fcc6bf949bce5"></a>
std::map&lt; std::string, HandlerCBType *, <a class="el" href="structArStrCaseCmpOp.html">ArStrCaseCmpOp</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>myMap</b></td></tr>
<tr class="separator:a7341309402a973a9e62fcc6bf949bce5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acf306e2907093c6d71f548547634bc21"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acf306e2907093c6d71f548547634bc21"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><b>myMaxNumArguments</b></td></tr>
<tr class="separator:acf306e2907093c6d71f548547634bc21"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa926e9753d840e0a6ec2315c7b372802"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa926e9753d840e0a6ec2315c7b372802"></a>
<a class="el" href="classArFunctor1.html">ArFunctor1</a>&lt; const char * &gt; *&#160;</td><td class="memItemRight" valign="bottom"><b>myPreParseFunctor</b></td></tr>
<tr class="separator:aa926e9753d840e0a6ec2315c7b372802"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a42eec2544de45dbadac0a6c45c835f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8a42eec2544de45dbadac0a6c45c835f"></a>
HandlerCBType *&#160;</td><td class="memItemRight" valign="bottom"><b>myRemainderHandler</b></td></tr>
<tr class="separator:a8a42eec2544de45dbadac0a6c45c835f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Class for parsing files more easily. </p>
<p>This class helps parse text files based on keywords followed by various values. To use it, add functors of different types of arguments with <a class="el" href="classArFileParser.html#ae9685e3b4f3ed5bbd0f7107ab9d81122" title="Adds a functor to handle a keyword that wants an easily parsable string. ">addHandler()</a>, then call <a class="el" href="classArFileParser.html#a54539be017dc61f50eac8ae5983ead91" title="Opens, parses, and then closes the specified file. ">parseFile()</a> to parse the file and invoke the various functors as items are read from the file. <a class="el" href="classArFileParser.html#a54539be017dc61f50eac8ae5983ead91" title="Opens, parses, and then closes the specified file. ">parseFile()</a> returns true if there were no errors parsing and false if there were errors.</p>
<p>One side feature is that you can have ONE handler for the keyword NULL, and if there is a line read that isn't entirely comments or whitespace that handler will be given the line. There isn't an explicit set for them since then there'd be another set of 5 adds.</p>
<p>There should be some whitespace after keywords in the file, and any semicolon (;) or hash mark (#) will act as a comment with the rest of the line ignored. (Alternative comment delimeters may be set using setCommentDelimeters()). If no handler exists for the first word the line is passed to the handler above for NULL. You can't have any lines longer than 10000 characters or keywords longer than 512 characters (though I don't know why you'd have either). If you have more than 2048 words on a line you'll have problems as well.</p>
<dl class="section note"><dt>Note</dt><dd><a class="el" href="classArFileParser.html" title="Class for parsing files more easily. ">ArFileParser</a> does not escape any special characters when writing or loading to/from a file. Therefore in general keywords, values, and comments must not contain characters which have special meaning in a config file, such as '#', ';', tab or newline. </dd></dl>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ab5a2431669a64d9beafdf4b1d9a8c437"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ArFileParser::ArFileParser </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>baseDirectory</em> = <code>&quot;./&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>isPreCompressQuotes</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">baseDirectory</td><td>the char * name of the base directory; the file name is specified relative to this directory </td></tr>
    <tr><td class="paramname">isPreCompressQuotes</td><td>a bool set to true if the file parser should treat strings enclosed in double-quotes as a single argument (such strings must be surrounded by spaces). This is roughly equivalent to calling ArArgumentBuilder::compressQuoted(false) on the resulting builder, but is more efficient and handles embedded spaces better. The default value is false and preserves the original behavior where each argument is a space-separated alphanumeric string. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ac9ea873d4673c1e2c00c42434ed2276b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArFileParser::addHandlerWithError </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>keyword</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classArRetFunctor3.html">ArRetFunctor3</a>&lt; bool, <a class="el" href="classArArgumentBuilder.html">ArArgumentBuilder</a> *, char *, size_t &gt; *&#160;</td>
          <td class="paramname"><em>functor</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Adds a functor to handle a keyword that wants an easily parsable string and returns error messages. </p>
<p>This function has a different name than addProcessFileCB just so that if you mean to get this function but have the wrong functor you'll get an error.</p>
<p>The rem's are the same though since that shouldn't matter. </p>

</div>
</div>
<a class="anchor" id="a0a2af2524acb8e7e02c87dc2944e40c2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ArFileParser::clearCommentDelimiters </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Clears the strings used to mark comments in the file to be parsed. </p>
<p>Call this method to indicate that the file type to be parsed does not contain comments. </p>

</div>
</div>
<a class="anchor" id="a54539be017dc61f50eac8ae5983ead91"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArFileParser::parseFile </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>fileName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>continueOnErrors</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>noFileNotFoundMessage</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>errorBuffer</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>errorBufferLen</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Opens, parses, and then closes the specified file. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fileName</td><td>the file to open</td></tr>
    <tr><td class="paramname">continueOnErrors</td><td>whether to continue or immediately bail upon an error</td></tr>
    <tr><td class="paramname">noFileNotFoundMessage</td><td>whether or not to log if we find a file (we normally want to but for robot param files that'd be too annoying since we test for a lot of files)</td></tr>
    <tr><td class="paramname">errorBuffer</td><td>buffer to put errors into if not NULL. Only the first error is saved, and as soon as this function is called it immediately empties the errorBuffer</td></tr>
    <tr><td class="paramname">errorBufferLen</td><td>the length of <em>errorBuffer</em> </td></tr>
  </table>
  </dd>
</dl>
<p>if( setvbuf( file, buf, _IOFBF, sizeof( buf ) ) != 0 ) printf( "Incorrect type or size of buffer for file\n" ); else printf( "'file' now has a buffer of 1024 bytes\n" );</p>

</div>
</div>
<a class="anchor" id="a01ea53048ed82fc16ada1c6107809794"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArFileParser::parseFile </td>
          <td>(</td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>file</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>bufferLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>continueOnErrors</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>errorBuffer</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>errorBufferLen</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Parses an open file; the file is not closed by this method. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">file</td><td>the open FILE* to be parsed; must not be NULL </td></tr>
    <tr><td class="paramname">buffer</td><td>a non-NULL char array in which to read the file </td></tr>
    <tr><td class="paramname">bufferLength</td><td>the number of chars in the buffer; must be greater than 0 </td></tr>
    <tr><td class="paramname">continueOnErrors</td><td>a bool set to true if parsing should continue even after an error is detected</td></tr>
    <tr><td class="paramname">file</td><td>File pointer for a file to be parsed. The file must be open for reading (e.g. with <a class="el" href="classArUtil.html#a0c4d240777628983e66005d7f7a4939c" title="Opens a file, defaulting it so that the file will close on exec. ">ArUtil::fopen()</a>) and this pointer must not be NULL. </td></tr>
    <tr><td class="paramname">buffer</td><td>a non-NULL char array in which to read the file </td></tr>
    <tr><td class="paramname">bufferLength</td><td>the number of chars in the buffer; must be greater than 0 </td></tr>
    <tr><td class="paramname">continueOnErrors</td><td>a bool set to true if parsing should continue even after an error is detected </td></tr>
    <tr><td class="paramname">errorBuffer</td><td>buffer to put errors into if not NULL. Only the first error is saved, and as soon as this function is called it immediately empties the errorBuffer </td></tr>
    <tr><td class="paramname">errorBufferLen</td><td>the length of <em>errorBuffer</em> </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a17264d80465f66ef31d2f6e6ac1ce266"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ArFileParser::setCommentDelimiters </td>
          <td>(</td>
          <td class="paramtype">const std::list&lt; std::string &gt; &amp;&#160;</td>
          <td class="paramname"><em>delimiters</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the strings used to mark comments in the file to be parsed. </p>
<p>By default, the ";" and "#" strings are used to indicate comments.</p>
<p>Call this method to override the defaults.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">delimiters</td><td>each string represents a comment delimiter. The comment delimiter and any following characters in the current line will be stripped during parsing of the file </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>ArFileParser.h</li>
<li>ArFileParser.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="classArFileParser.html">ArFileParser</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
